\section{pdo.\+c File Reference}
\label{pdo_8c}\index{pdo.\+c@{pdo.\+c}}


Ether\+C\+AT process data object methods.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ ec\+\_\+pdo\+\_\+init} (\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo)
\begin{DoxyCompactList}\small\item\em P\+DO constructor. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+pdo\+\_\+init\+\_\+copy} (\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo, const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$other\+\_\+pdo)
\begin{DoxyCompactList}\small\item\em P\+DO copy constructor. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+pdo\+\_\+clear} (\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo)
\begin{DoxyCompactList}\small\item\em P\+DO destructor. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+pdo\+\_\+clear\+\_\+entries} (\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo)
\begin{DoxyCompactList}\small\item\em Clear P\+DO entry list. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+pdo\+\_\+set\+\_\+name} (\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo, const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Set P\+DO name. \end{DoxyCompactList}\item 
\textbf{ ec\+\_\+pdo\+\_\+entry\+\_\+t} $\ast$ \textbf{ ec\+\_\+pdo\+\_\+add\+\_\+entry} (\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo, uint16\+\_\+t index, uint8\+\_\+t subindex, uint8\+\_\+t bit\+\_\+length)
\begin{DoxyCompactList}\small\item\em Add a new P\+DO entry to the configuration. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+pdo\+\_\+copy\+\_\+entries} (\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo, const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$other)
\begin{DoxyCompactList}\small\item\em Copy P\+DO entries from another P\+DO. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+pdo\+\_\+equal\+\_\+entries} (const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo1, const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo2)
\begin{DoxyCompactList}\small\item\em Compares the entries of two P\+D\+Os. \end{DoxyCompactList}\item 
unsigned int \textbf{ ec\+\_\+pdo\+\_\+entry\+\_\+count} (const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo)
\begin{DoxyCompactList}\small\item\em Get the number of P\+DO entries. \end{DoxyCompactList}\item 
const \textbf{ ec\+\_\+pdo\+\_\+entry\+\_\+t} $\ast$ \textbf{ ec\+\_\+pdo\+\_\+find\+\_\+entry\+\_\+by\+\_\+pos\+\_\+const} (const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo, unsigned int pos)
\begin{DoxyCompactList}\small\item\em Finds a P\+DO entry via its position in the list. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+pdo\+\_\+print\+\_\+entries} (const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$pdo)
\begin{DoxyCompactList}\small\item\em Outputs the P\+D\+Os in the list. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Ether\+C\+AT process data object methods. 



\subsection{Function Documentation}
\mbox{\label{pdo_8c_a0766e8e7b4f607aa3b8ce3320198c23b}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+init@{ec\+\_\+pdo\+\_\+init}}
\index{ec\+\_\+pdo\+\_\+init@{ec\+\_\+pdo\+\_\+init}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+init()}
{\footnotesize\ttfamily void ec\+\_\+pdo\+\_\+init (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo }\end{DoxyParamCaption})}



P\+DO constructor. 


\begin{DoxyParams}{Parameters}
{\em pdo} & Ether\+C\+AT P\+DO \\
\hline
\end{DoxyParams}


Definition at line 46 of file pdo.\+c.

\mbox{\label{pdo_8c_aa3110f0f43df1aa859a25a7a53be431c}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+init\+\_\+copy@{ec\+\_\+pdo\+\_\+init\+\_\+copy}}
\index{ec\+\_\+pdo\+\_\+init\+\_\+copy@{ec\+\_\+pdo\+\_\+init\+\_\+copy}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+init\+\_\+copy()}
{\footnotesize\ttfamily int ec\+\_\+pdo\+\_\+init\+\_\+copy (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo,  }\item[{const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{other\+\_\+pdo }\end{DoxyParamCaption})}



P\+DO copy constructor. 


\begin{DoxyRetVals}{Return values}
{\em 0} & Success. \\
\hline
{\em $<$0} & Error code. \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em pdo} & P\+DO to create. \\
\hline
{\em other\+\_\+pdo} & P\+DO to copy from. \\
\hline
\end{DoxyParams}


Definition at line 62 of file pdo.\+c.

\mbox{\label{pdo_8c_a2fdbc33334b65a05865e9df69df1737c}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+clear@{ec\+\_\+pdo\+\_\+clear}}
\index{ec\+\_\+pdo\+\_\+clear@{ec\+\_\+pdo\+\_\+clear}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+clear()}
{\footnotesize\ttfamily void ec\+\_\+pdo\+\_\+clear (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo }\end{DoxyParamCaption})}



P\+DO destructor. 


\begin{DoxyParams}{Parameters}
{\em pdo} & Ether\+C\+AT P\+DO. \\
\hline
\end{DoxyParams}


Definition at line 94 of file pdo.\+c.

\mbox{\label{pdo_8c_a399136c28e710fa96af02e46c0351dbb}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+clear\+\_\+entries@{ec\+\_\+pdo\+\_\+clear\+\_\+entries}}
\index{ec\+\_\+pdo\+\_\+clear\+\_\+entries@{ec\+\_\+pdo\+\_\+clear\+\_\+entries}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+clear\+\_\+entries()}
{\footnotesize\ttfamily void ec\+\_\+pdo\+\_\+clear\+\_\+entries (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo }\end{DoxyParamCaption})}



Clear P\+DO entry list. 


\begin{DoxyParams}{Parameters}
{\em pdo} & Ether\+C\+AT P\+DO. \\
\hline
\end{DoxyParams}


Definition at line 106 of file pdo.\+c.

\mbox{\label{pdo_8c_a8bd12e530ccbb342e5e4434d3464777a}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+set\+\_\+name@{ec\+\_\+pdo\+\_\+set\+\_\+name}}
\index{ec\+\_\+pdo\+\_\+set\+\_\+name@{ec\+\_\+pdo\+\_\+set\+\_\+name}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+set\+\_\+name()}
{\footnotesize\ttfamily int ec\+\_\+pdo\+\_\+set\+\_\+name (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Set P\+DO name. 


\begin{DoxyRetVals}{Return values}
{\em 0} & Success. \\
\hline
{\em $<$0} & Error code. \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em pdo} & P\+DO. \\
\hline
{\em name} & New name. \\
\hline
\end{DoxyParams}


Definition at line 125 of file pdo.\+c.

\mbox{\label{pdo_8c_a2df3cd7ded1048aa232f2f5c19a07229}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+add\+\_\+entry@{ec\+\_\+pdo\+\_\+add\+\_\+entry}}
\index{ec\+\_\+pdo\+\_\+add\+\_\+entry@{ec\+\_\+pdo\+\_\+add\+\_\+entry}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+add\+\_\+entry()}
{\footnotesize\ttfamily \textbf{ ec\+\_\+pdo\+\_\+entry\+\_\+t}$\ast$ ec\+\_\+pdo\+\_\+add\+\_\+entry (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo,  }\item[{uint16\+\_\+t}]{index,  }\item[{uint8\+\_\+t}]{subindex,  }\item[{uint8\+\_\+t}]{bit\+\_\+length }\end{DoxyParamCaption})}



Add a new P\+DO entry to the configuration. 


\begin{DoxyRetVals}{Return values}
{\em Pointer} & to the added entry, otherwise a E\+R\+R\+\_\+\+P\+T\+R() code. \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em pdo} & P\+DO. \\
\hline
{\em index} & New entry\textquotesingle{}s index. \\
\hline
{\em subindex} & New entry\textquotesingle{}s subindex. \\
\hline
{\em bit\+\_\+length} & New entry\textquotesingle{}s bit length. \\
\hline
\end{DoxyParams}


Definition at line 157 of file pdo.\+c.

\mbox{\label{pdo_8c_a31ae386c7c51b495354db61f08e019a3}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+copy\+\_\+entries@{ec\+\_\+pdo\+\_\+copy\+\_\+entries}}
\index{ec\+\_\+pdo\+\_\+copy\+\_\+entries@{ec\+\_\+pdo\+\_\+copy\+\_\+entries}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+copy\+\_\+entries()}
{\footnotesize\ttfamily int ec\+\_\+pdo\+\_\+copy\+\_\+entries (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo,  }\item[{const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{other }\end{DoxyParamCaption})}



Copy P\+DO entries from another P\+DO. 


\begin{DoxyRetVals}{Return values}
{\em 0} & Success. \\
\hline
{\em $<$0} & Error code. \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em pdo} & P\+DO whos entries shall be replaced. \\
\hline
{\em other} & Pdo with entries to copy. \\
\hline
\end{DoxyParams}


Definition at line 186 of file pdo.\+c.

\mbox{\label{pdo_8c_a17ae4ccdd1aa4cfb9748b89ee9cbbfd0}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+equal\+\_\+entries@{ec\+\_\+pdo\+\_\+equal\+\_\+entries}}
\index{ec\+\_\+pdo\+\_\+equal\+\_\+entries@{ec\+\_\+pdo\+\_\+equal\+\_\+entries}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+equal\+\_\+entries()}
{\footnotesize\ttfamily int ec\+\_\+pdo\+\_\+equal\+\_\+entries (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo1,  }\item[{const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo2 }\end{DoxyParamCaption})}



Compares the entries of two P\+D\+Os. 


\begin{DoxyRetVals}{Return values}
{\em 1} & The entries of the given P\+D\+Os are equal. \\
\hline
{\em 0} & The entries of the given P\+D\+Os differ. \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em pdo1} & First P\+DO. \\
\hline
{\em pdo2} & Second P\+DO. \\
\hline
\end{DoxyParams}


Definition at line 222 of file pdo.\+c.

\mbox{\label{pdo_8c_afff7e1d1a20a2845d14c05f697fda33e}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+entry\+\_\+count@{ec\+\_\+pdo\+\_\+entry\+\_\+count}}
\index{ec\+\_\+pdo\+\_\+entry\+\_\+count@{ec\+\_\+pdo\+\_\+entry\+\_\+count}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+entry\+\_\+count()}
{\footnotesize\ttfamily unsigned int ec\+\_\+pdo\+\_\+entry\+\_\+count (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo }\end{DoxyParamCaption})}



Get the number of P\+DO entries. 

\begin{DoxyReturn}{Returns}
Number of P\+DO entries. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em pdo} & P\+DO. \\
\hline
\end{DoxyParams}


Definition at line 257 of file pdo.\+c.

\mbox{\label{pdo_8c_a9fa0c22e26d024fa3e5e4ccd77d3efe5}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+find\+\_\+entry\+\_\+by\+\_\+pos\+\_\+const@{ec\+\_\+pdo\+\_\+find\+\_\+entry\+\_\+by\+\_\+pos\+\_\+const}}
\index{ec\+\_\+pdo\+\_\+find\+\_\+entry\+\_\+by\+\_\+pos\+\_\+const@{ec\+\_\+pdo\+\_\+find\+\_\+entry\+\_\+by\+\_\+pos\+\_\+const}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+find\+\_\+entry\+\_\+by\+\_\+pos\+\_\+const()}
{\footnotesize\ttfamily const \textbf{ ec\+\_\+pdo\+\_\+entry\+\_\+t}$\ast$ ec\+\_\+pdo\+\_\+find\+\_\+entry\+\_\+by\+\_\+pos\+\_\+const (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo,  }\item[{unsigned int}]{pos }\end{DoxyParamCaption})}



Finds a P\+DO entry via its position in the list. 

Const version.

\begin{DoxyReturn}{Returns}
Search result, or N\+U\+LL. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em pdo} & P\+DO. \\
\hline
{\em pos} & Position in the list. \\
\hline
\end{DoxyParams}


Definition at line 279 of file pdo.\+c.

\mbox{\label{pdo_8c_a4009041a62d3844c85987c25ecaaf78f}} 
\index{pdo.\+c@{pdo.\+c}!ec\+\_\+pdo\+\_\+print\+\_\+entries@{ec\+\_\+pdo\+\_\+print\+\_\+entries}}
\index{ec\+\_\+pdo\+\_\+print\+\_\+entries@{ec\+\_\+pdo\+\_\+print\+\_\+entries}!pdo.\+c@{pdo.\+c}}
\subsubsection{ec\+\_\+pdo\+\_\+print\+\_\+entries()}
{\footnotesize\ttfamily void ec\+\_\+pdo\+\_\+print\+\_\+entries (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+pdo\+\_\+t} $\ast$}]{pdo }\end{DoxyParamCaption})}



Outputs the P\+D\+Os in the list. 


\begin{DoxyParams}{Parameters}
{\em pdo} & P\+DO. \\
\hline
\end{DoxyParams}


Definition at line 299 of file pdo.\+c.

